import {
	request
} from "./request";

// 获取年级
export function getGradeData() {
	return request({
		url: "/api/grade_t",
		method: "post"
	});
}

// 获取跟读教材列表
export function getFollowReadingBooks(data) {
	return request({
		url: "/api/repeat",
		method: "post"
	}, {
		data,
	});
}

// 获取教材详情
export const getBookDetails = (data) => {
	return request({
		url: "/api/repeat/detail",
		method: "post"
	}, {
		data,
	});
};

// 获取章节列表
export const getBookChapterlist = (data) => {
	return request({
		url: "/api/repeat/chapterlist",
		method: "post"
	}, {
		data,
	});
};

// 获取章节详情
export const getBookChapterDetail = (data) => {
	return request({
		url: "/api/repeat/chapterdetail",
		method: "post"
	}, {
		data,
	});
};

// 获取模拟试题
export const getMockTests = (query) => {
	return request({
		url: "/api/common/questions",
		method: "get"
	}, {
		query,
	});
};
//保存模拟试题
export function saveExercise(data) {
	return request({
		url: '/api/new_answer/saveExercise',
		method: "post"
	}, {
		data,
	});
};
//保存刷单词记录
export function addBrushWords(data) {
	return request({
		url: '/api/reciting/addWords',
		method: "post"
	}, {
		data,
	});
};